package fr.miage.ageco.web.beans;

import java.util.List;

import javax.annotation.PostConstruct;

import fr.miage.ageco.dataaccess.bo.Agence;
import fr.miage.ageco.dataaccess.services.AgenceService;

public class AgenceBean {

	AgenceService agenceService;

	private int id;
	private String nom;

	private List<Agence> listAgences;
	
	public AgenceBean() {
	}

	@PostConstruct
	public void init() {
		listAgences = getAllAgences();
	}
	
	public List<Agence> getAllAgences(){
		return agenceService.getAllAgences();
	}
	
	public AgenceService getAgenceService() {
		return agenceService;
	}

	public void setAgenceService(AgenceService agenceService) {
		this.agenceService = agenceService;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}




	public List<Agence> getListAgences() {
		return listAgences;
	}




	public void setListAgences(List<Agence> listAgences) {
		this.listAgences = listAgences;
	}

}
